﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace PedesTrainProject.GUI
{
    public partial class File_settings : Form
    {
        private SimulationCreator simulationCreator;

        public File_settings(SimulationCreator _simulationCreator)
        {
            simulationCreator = _simulationCreator;
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void File_settings_FormClosed(object sender, FormClosedEventArgs e)
        {

        }

        private void button2_Click(object sender, EventArgs e)
        {
            simulationCreator.CoreGUI.setStartTime(new DateTime(Convert.ToInt32(2012),Convert.ToInt32(startMonthInput.Value),Convert.ToInt32(startDayInput.Value),Convert.ToInt32(startHourInput.Value),0,0));
            simulationCreator.CoreGUI.setEndTime(new DateTime(Convert.ToInt32(2012), Convert.ToInt32(endMonthInput.Value), Convert.ToInt32(endDayInput.Value), Convert.ToInt32(endHourInput.Value), 0, 0));
            this.Close();
        }
    }
}
